<extend name="Public:common"/>
<block name="css">
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css"  media="all">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/webuploader/webuploader.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/webuploader/style.css" />
    <style>
        .newMess th{text-align:center;}
        th,td{padding: 10px;}
        .row-div {
            height: auto;
            line-height: 30px;
            font-size: 14px;
            margin-bottom: 10px;
            padding: 0px 100px!important;
        }
        .base-info-box{
            margin: 20px 40px;
            height: 40px;
            line-height: 40px;
            background-color: #F6FBFD;
        }
        .header-bg-01{
            width: 2px;
            height: 40px;
            background-color: #5BC0DE;
            display: inline-block;
            float: left;
        }
        .header-title{
            float: left;
            display: inline-block;
            height: 40px;
            padding-left: 20px;
            line-height: 40px;
        }
        .col-md-5 input{
            width: 400px!important;
        }

        .col-md-5 select{
            width: 400px!important;
        }
        .explain{
            font-size: 12px;
            color: #ccc;
            height: 20px;
        }
        .margin-left-20{
            margin-left: 20px!important;
        }
        #wrapper{
            width: 900px!important;
        }
    </style>
</block>
<block name="content">
    <div class="page-header"><h1><i class="fa fa-home"></i> 首页>商家管理>添加注册门店</h1></div>
     <div class="container-fluid">
         <form action="{:U('addShop')}" method="post">

             <input type="hidden" name="reseller_id" value="{:I('id')}">

            <div class="base-info-box">
                    <span class="header-bg-01"></span>
                    <span class="header-title">基本信息</span>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>门店类型：</p></div>
                <div class="col-md-5">
                    <select id='reseller_type' name="reseller_type">
                        <option value=''>请选择门店类型</option>
                        <option value="1" <if condition="$info['reseller_type'] == 1">selected</if>>国内旅行社</option>
                        <option value="2" <if condition="$info['reseller_type'] == 2">selected</if>>国外旅行社</option>
                    </select>
                </div>
            </div>
             <div class="row row-div">
                 <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>币种：</p></div>
                 <div class="col-md-5">
                     <select id='currency_id' name="currency_id" required>
                         <option value=''>请选择币种</option>
                         <volist name="currency" id="vo">
                             <option value="{$vo.currency_id}" <if condition="$info['currency_id'] == $vo['currency_id']">selected</if>>{$vo.currency_name}</option>
                         </volist>
                     </select>
                 </div>
             </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>门店编号：</p></div>
                <div class="col-md-5">
                    <input class="form-input" value="{$info.reseller_sn|default=$shopSn}" readonly type="text" name="reseller_sn" id="reseller_sn" placeholder="请输入门店编号">
                   <!-- <div class="explain">
                        <span>门店编号用于登录时使用</span>
                    </div>-->
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>门店账号：</p></div>
                <div class="col-md-5">
                    <input class="form-input" required="required" value="{$info.reseller_account}" type="text" name="reseller_account" id="reseller_account" placeholder="请输入门店账号">
                </div>
            </div>
            <if condition = "!$info['login_pwd']">
                <div class="row row-div">
                    <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>登录密码：</p></div>
                    <div class="col-md-5">
                        <input class="form-input" required="required" type="text" name="login_pwd" id="login_pwd" placeholder="请输入登录密码">
                    </div>
                </div>
            </if>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>真实名称：</p></div>
                <div class="col-md-5">
                    <input class="form-input" required="required" value="{$info.reseller_name}" type="text" name="reseller_name" id="reseller_name" placeholder="请输入门店真实名称">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>手机号码：</p></div>
                <div class="col-md-5">
                    <input class="form-input" required="required" type="text" value="{$info.reseller_phone}" name="reseller_phone" id="reseller_phone" maxlength="50">
                    <div class="explain">
                        <span>手机号码用于登录时使用</span>
                    </div>
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>公司座机：</p></div>
                <div class="col-md-5">
                    <input class="form-input" required="required" type="text" value="{$info['landline_tel']}" name="landline_tel" id="landline_tel" placeholder="请输入公司座机">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">邮件地址：</p></div>
                <div class="col-md-5">
                    <input class="form-input" type="text" value="{$info.qq_email}" name="qq_email" id="qq_email" placeholder="请输入邮箱地址">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">性别：</p></div>
                <div class="col-md-6">
                    <input type='radio' width="30" <if condition="$info['reseller_gender'] eq 1"> checked</if> id='reseller_gender1' name='reseller_gender' value='1'/><span>男</span>
                    <input style="margin-left: 10px;" type='radio' <if condition="$info['reseller_gender'] eq 2"> checked</if>  width="30" id='reseller_gender2' name='reseller_gender' value='2'/><span>女</span>
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">账户状态：</p></div>
                <div class="col-md-6">
                    <input type='radio' width="30" id='reseller_status1' name='reseller_status' <if condition="$info['reseller_status'] eq -1"> checked</if>  value='-1'/><span>锁定</span>
                    <input style="margin-left: 10px;" type='radio' width="30" id='reseller_status2'  <if condition="$info['reseller_status'] eq 1"> checked</if>   name='reseller_status' value='1'/><span>正常</span>
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">自营积分：</p></div>
                <div class="col-md-6">
                    <input type='radio' width="30" id='is_selfScore1' <if condition="$info['is_selfScore'] eq -1"> checked</if> name='is_selfScore' checked  value='-1'/><span>否</span>
                    <input style="margin-left: 10px;" type='radio' width="30"  <if condition="$info['is_selfScore'] eq 1"> checked</if> id='is_selfScore2' name='is_selfScore' value='1'/><span>是</span>
                </div>
            </div>
            <div class="base-info-box">
                <span class="header-bg-01"></span>
                <span class="header-title">网店参数</span>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">网站名称：</p></div>
                <div class="col-md-5">
                    <input class="form-input"  type="text" value="{$info.web_name}" name="web_name" id="web_name" placeholder="请输入网站名称">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">网店域名：</p></div>
                <div class="col-md-5">
                    <input class="form-input" value="{$info.web_url}" type="text" name="web_url" id="web_url" placeholder="请输入网站域名">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">网店状态：</p></div>
                <div class="col-md-6">
                    <input type='radio' width="30" id='web_status1' <if condition="$info['is_selfScore'] eq 1"> checked</if> name='web_status' value='1'/><span>关闭</span>
                    <input style="margin-left: 10px;" type='radio' width="30" id='web_status2' <if condition="$info['is_selfScore'] eq 2"> checked</if> name='web_status' value='2'/><span>开启</span>
                </div>
            </div>
            <div class="base-info-box">
                <span class="header-bg-01"></span>
                <span class="header-title">门店信息</span>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>公司名称：</p></div>
                <div class="col-md-5">
                    <input class="form-input"  required="required" value="{$info.company_name}" type="text" name="company_name" id="company_name" placeholder="请输入公司名称">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">服务等级：</p></div>
                <div class="col-md-5">
                    <select id='service_level' name="service_level">
                        <for start="1" end="6">
                            <option value="{$i}" <if condition="$info['service_level'] == $i">selected</if>>{$i}星</option>
                        </for>
                    </select>
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>法人代表：</p></div>
                <div class="col-md-5">
                    <input class="form-input" required="required" type="text" value="{$info.legal_person}" name="legal_person" id="legal_person" placeholder="请输入公司法人代表">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>联系人：</p></div>
                <div class="col-md-5">
                    <input class="form-input" required="required" type="text" value="{$info.linkman}" name="linkman" id="linkman" placeholder="请输入联系人">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>传真：</p></div>
                <div class="col-md-5">
                    <input class="form-input" required="required" type="text" value="{$info.fax_number}" name="fax_number" id="fax_number" placeholder="请输入传真">
                </div>
            </div>
            <!-- <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>销售类型：</p></div>
                <div class="col-md-5">
                    <select id='sales_type' name="sales_type">
                        <option value=''>请选择销售类型</option>
                        <option value="1" <if condition="$info['sales_type'] == 1">selected</if>>直营店</option>
                        <option value="2" <if condition="$info['sales_type'] == 2">selected</if>>加盟店</option>
                    </select>
                </div>
            </div> -->
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>所在地：</p></div>
                <div class="col-md-7">
                    国家
                    <select name="country_id" id="ar_country_id"  onchange="getProvince(this,'ar')" required>
                        <option value="">==选择国家==</option>
                        <volist name="country" id="vo">
                            <option <if condition="$info['country_id'] eq $vo['areaId']">selected</if>  value="{$vo.areaId}">{$vo.areaName}</option>
                        </volist>
                    </select>

                    省
                    <select name="province_id" id="ar_province_id"  onchange="getCity(this,'ar')" required>
                        <option value="">==选择省==</option>
                        <volist name="info.province" id="vo">
                            <option   <if condition="$info['province_id'] eq $vo['areaId']">selected</if>  value="{$vo.areaId}">{$vo.areaName}</option>
                        </volist>
                    </select>
                    市
                    <select name="city_id" id="ar_city_id"  onchange="getArea(this,'ar')" required>
                        <option value="">==选择市==</option>
                        <volist name="info.city" id="vo">
                            <option <if condition="$info['city_id'] eq $vo['areaId']">selected</if> value="{$vo.areaId}">{$vo.areaName}</option>
                        </volist>
                    </select>
                    区
                    <select name="area_id"   id="ar_area_id"  required>
                        <option value="">==选择区==</option>
                        <volist name="info.area" id="vo">
                            <option <if condition="$info['area_id'] eq $vo['areaId']">selected</if>  value="{$vo.areaId}">{$vo.areaName}</option>
                        </volist>
                    </select>

                  <!--  <select id='province_id' onchange='javascript:getAreaList("areaId2",this.value,0)'>
                        <option value=''>请选择</option>
                        <volist name="areaList" id="vo">
                            <option value='{$vo['areaId']}' <if condition="$info['areaId1'] == $vo['areaId'] ">selected</if>>{$vo['areaName']}</option>
                        </volist>
                    </select>
                    <select id='city_id'  onchange='javascript:getAreaList("areaId3",this.value,1);getCommunitys()'>
                        <option value=''>请选择</option>
                    </select>
                    <select id='area_id' >
                        <option value=''>请选择</option>
                    </select>-->
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">社区/街道：</p></div>
                <div class="col-md-5">
                    <input class="form-input" type="text" value="{$info.detailed_address}" name="detailed_address" id="detailed_address" placeholder="请输入详细地址">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">证件号：</p></div>
                <div class="col-md-5">
                    <input class="form-input" type="text" value="{$info.id_number}" name="id_number" id="id_number" placeholder="请输入证件号码">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">身份证是否认证：</p></div>
                <div class="col-md-6">
                    <input type='radio' width="30"  <if condition="$info['is_certification'] eq -1">checked</if>  id='is_certification2' name='is_certification' checked  value='-1'/><span>未认证</span>
                    <input style="margin-left: 10px;" type='radio'  <if condition="$info['is_certification'] eq 1">checked</if> width="30" id='is_certification2' name='is_certification' value='1'/><span>已认证</span>
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">排序：</p></div>
                <div class="col-md-5">
                    <input class="form-input" type="text" value="{$info.sort}" name="sort" id="sort" placeholder="请输入排序号">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>合作时间：</p></div>
                <div class="col-md-6">

                    <input class="form-input" style="width: 190px;" required="required" type="text" value="{$info.start_time}" name="start_time" id="start_time" placeholder="请选择起始时间">
                    至
                    <input class="form-input" style="width: 190px;" required="required" type="text" value="{$info.end_time}" name="end_time" id="end_time" placeholder="请选择结束时间">
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>公司业务：</p></div>
                <div class="col-md-5">
                    <textarea class="form-input" style="width: 400px;height: 100px;" type="text"  name="business_details" id="business_details" placeholder="公司业务详情">{$info.business_details}</textarea>
                </div>
            </div>
            <div class="row row-div">
                <div class="col-md-2" ><p class="text-right">系统备注：</p></div>
                <div class="col-md-5">
                    <textarea class="form-input" style="width: 400px;height: 100px;" value="{$info['system_remarks']}" type="text" name="system_remarks" id="system_remarks" placeholder="系统备注">{$info.system_remarks}</textarea>
                </div>
            </div>
            <div class="base-info-box">
                <span class="header-bg-01"></span>
                <span class="header-title">营业执照</span>
            </div>
             <div class="row row-div">
                 <div class="col-md-2" ><p class="text-right"><font color='red'>*</font>营业执照：</p></div>
                 <div class="col-md-5">
                     <input type="text" name="business_img"  value="{$info.business_img}"  class="pull-left" readonly>
                     <input type="file" class="pull-left" onchange="ajax_upload_file(this.files,this)">
                     <img class="thumbImg pull-right" src="{$info.business_img}" alt="">
                 </div>
             </div>
            <!--<div id="wrapper">
                <div id="container">
                    &lt;!&ndash;头部，相册选择和格式选择&ndash;&gt;

                    <div id="uploader">
                        <div class="queueList">
                            <div id="dndArea" class="placeholder">
                                <div id="filePicker"></div>
                                <p>或将照片拖到这里，单次最多可选300张</p>
                            </div>
                        </div>
                        <div class="statusBar" style="display:none;">
                            <div class="progress">
                                <span class="text">0%</span>
                                <span class="percentage"></span>
                            </div><div class="info"></div>
                            <div class="btns">
                                <div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>-->
            <div style="height: 10px" ></div>
             <div class="col-md-offset-3 col-md-9" style="margin-left: 0px;text-align: center;width: 100%;">
                 <input type="hidden" name="is_review" value="{$supplierInfo['is_review']|default="-1"}">
                 <button class="btn btn-info" type="submit">
                     <i class="icon-ok bigger-110"></i>提交
                 </button>&nbsp; &nbsp; &nbsp;
                 <button class="btn" type="button" onclick="changeReview(-1)">
                     <i class="icon-undo bigger-110"></i>拒绝
                 </button>&nbsp; &nbsp; &nbsp;
                 <button class="btn btn-info" type="button" onclick="changeReview(1)">
                     <i class="icon-ok bigger-110"></i>通过
                 </button>&nbsp; &nbsp; &nbsp;
             </div>
            <div style="height: 200px" ></div>

         </form>
     </div>
</block>
<block name="js">
    <script src="__STATIC__/layui/layui.all.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>
    <script type="text/javascript" src="__PUBLIC__/plugins/webuploader/webuploader.js"></script>
    <script type="text/javascript" src="__PUBLIC__/plugins/webuploader/upload.js"></script>
    <script>

        function changeReview(status) {
            $('input[name="is_review"]').val(status);
            $('form')[0].submit();
        }

        layui.use('laydate', function() {
            var laydate = layui.laydate;
            //常规用法
            laydate.render({
                elem: '#start_time',
            });
            laydate.render({
                elem: '#end_time',
            });
        });
    </script>
</block>